/**
 * 调用百度地图
 *
 * @author 畅赢科技
 */

import * as types from '../actions/actionTypes';

const initialState = {
    isLoading: true,
    isToasting: false,
};

let baiduReducer = (state=initialState, action) => {
    switch (action.type) {
        case types.sBaiduPoi:
            return {
                ...state,
                isLoading: true
            };
        case types.gBaiduPoi:
            return {
                ...state,
                ...action,
                isLoading: false
            };
        default:
            return state;
    }
};

export default baiduReducer;